<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>弹性布局</title>
    <style>
        .father {
            width: 400px;
            height: 300px;
            background-color: darksalmon;
            /* 1. 启动弹性布局 */
            display: flex;
            /* 2. 改变主轴方向 */
            /* flex-direction: column; */

            /* 3. 设置是否换行 */
            /* flex-wrap: wrap; */

            /* 4. 主轴方向和换行的复合属性 */
            /* flex-flow: row wrap; */

            /* 5. 儿子在主轴的对齐方式 */
            /* justify-content: center; */

            /* 6. 儿子在交叉轴的对齐方法 */
            /* align-items: center; */

            /* 7. 多行儿子在交叉轴的对齐方法 */
            align-content: space-evenly;
        }

        .child {
            width: 100px;
            height: 100px;
            border: 1px solid;
            background-color: chartreuse;
        }

        .child1 {
            /* flex-grow: 2; */
        }

        .child3 {
            /* flex-grow: 1; */
            flex-basis: 50%;
            flex-shrink: 0;
            align-self: center;
            order: -1;
        }
    </style>
</head>

<body>

    <div class="father">
        <div class="child child1">1</div>
        <div class="child">2</div>
        <div class="child child3">3</div>
      
    </div>
</body>

</html>